<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common::common('新增菜单管理')"/>
    <script th:src="@{/static/assets/backstage/pear/component/pear/pear.js}"></script>
    <script th:src="@{/static/admin/menu/add.js}" charset="utf-8"></script>
</head>
<body>

<form class="layui-form" id="addMenuInfoForm">
    <div class="layui-form-body">

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>类型
            </label>
            <div class="layui-input-block" th:with="dicts=${@dict.data('menu_type')}">
                <input type="radio" name="type" th:each="dict : ${dicts}"
                       th:id="${'type_' + dict.value}"
                       th:title="${dict.label}"
                       th:value="${dict.value}"
                       th:checked="${dict.isDefault}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>图标
            </label>
            <div class="layui-input-block">
                <input type="text" id="icon" name="icon" class="layui-input" value="layui-icon-face-smile-fine" lay-filter="iconPicker3">
                <!--                <input type="text" id="icon" name="icon"-->
                <!--                       autocomplete="off" lay-verify="required" class="layui-input">-->
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>权限编码
            </label>
            <div class="layui-input-block">
                <input type="text" id="code" name="code"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>标题
            </label>
            <div class="layui-input-block">
                <input type="text" id="title" name="title"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>资源路径
            </label>
            <div class="layui-input-block">
                <input type="text" id="path" name="path"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>排序
            </label>
            <div class="layui-input-block">
                <input type="text" id="orderNum" name="orderNum"
                       oninput="value=value.replace(/[^\d]/g,'')" maxlength="3"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>打开方式
            </label>
            <div class="layui-input-block" th:with="dicts=${@dict.data('menu_iframe')}">
                <input type="radio" name="iframe" th:each="dict : ${dicts}"
                       th:id="${'iframe_' + dict.value}"
                       th:title="${dict.label}"
                       th:value="${dict.value}"
                       th:attr="checked=${dict.isDefault}">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>是否显示
            </label>
            <div class="layui-input-block" th:with="dicts=${@dict.data('menu_visible')}">
                <input type="radio" name="visible" th:each="dict : ${dicts}"
                       th:id="${'visible_' + dict.value}"
                       th:title="${dict.label}"
                       th:value="${dict.value}"
                       th:checked="${dict.isDefault}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                描述
            </label>
            <div class="layui-input-block">
                <textarea id="remarks" name="remarks" maxlength="200"
                          autocomplete="off" class="layui-textarea"></textarea>
            </div>
        </div>
    </div>
    <input type="text" th:value="*{parentId}" id="parentId" name="parentId" style="display: none">
    <input type="text" value="web_app" id="clientId" name="clientId" style="display: none">
    <div class="form-footer">
        <button type="button" class="button-sub" lay-submit lay-filter="saveMenuInfo">保存</button>
        <button type="button" class="button-close" id="buttonClose">关闭</button>
    </div>
</form>
</body>
</html>